Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Tenor feature flag through selected build type #4

Merged

Conversation

ThomazFB
Copy link
Owner

@ThomazFB ThomazFB commented Apr 2, 2020

Summary

This Pull Request makes possible to enable or disable the Tenor GIF picker availability accordingly to the selected WordPress build type. This change adds to the issue 11456.

Wasabi and Zalpha Vanilla
screenshot-1585788487864 screenshot-1585788395658
screenshot-1585788446924 screenshot-1585788432154

The solution proposes the following implementation:

  • The BuildConfig now receive the declaration of the boolean TENOR_AVAILABLE field directly from the build.gradle.

  • The button availability to select the Tenor GIF picker follows the TENOR_AVAILABLE value, if the value is false, the button doesn't get configured and should never appear on the screen.

  • The TENOR_AVAILABLE is set as true for the Wasabi and Zalpha builds and false for the Vanilla build.

Testing from the Post Editor

with Wasabi and Zalpha build

  1. Click to create a new post
  2. Click on the overflow button at the top right end of the screen
  3. select the Switch to classic editor
  4. Click on the plus (+) button at the bottom left end of the screen
  5. Verify that the Choose from Tenor option is available
  6. Type in the search bar to query GIFs
  7. Once inside the Gif Picker, make sure that selection, preview and add are all working as expected

with Vanilla build

  1. Click to create a new post
  2. Click on the overflow button at the top right end of the screen
  3. select the Switch to classic editor
  4. Click on the plus (+) button at the bottom left end of the screen
  5. Verify that the Choose from Tenor option isn't there

Testing from the Media Browser

with Wasabi and Zalpha build

  1. Go to the Media Browser
  2. Click on the Add button at the top right
  3. Verify that the Choose from Tenor option is available
  4. Type in the search bar to query GIFs
  5. Once inside the Gif Picker, make sure that selection, preview and add are all working as expected

with Vanilla build

  1. Go to the Media Browser
  2. Click on the Add button at the top right.
  3. Verify that the Choose from Tenor option isn't there

PR submission checklist

  • I have considered adding unit tests where possible.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

Copy link

@planarvoid planarvoid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks for the change 👍

@ThomazFB ThomazFB merged this pull request into issue/11456-add-tenor-support Apr 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants